<template>
  <div>
    <component
      :is="componentView"
      :title="title"
      :categoryData="categoryData"
    ></component>
  </div>
</template>

<script>
export default {
  name: "Card",
  components: {},
  props: ["componentName", "categoryData", "title"],
  data() {
    return {
      componentView: {},
    };
  },
  computed: {},
  watch: {},
  created() {
    console.log("Card:::" + this.componentName);
    if (
      this.componentName != null ||
      this.componentName != "" ||
      this.componentName != "undefined"
    ) {
      this.componentView = () => import("./" + this.componentName);
    } else {
      this.componentView = () => import("./CardHorizontal");
    }
  },
  mounted() {},
  methods: {},
};
</script>

<style scoped lang="scss">
</style>
